package com.cngphone.AnFetion;

import com.cngphone.AnFetion2.R;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;



public class NewEditText extends EditText {

    int oriHeight=0;
    Button sendButton;
    
	public NewEditText (Context context)
	{
		super(context);
	}

	public NewEditText (Context context, AttributeSet attrs)
	{
		super(context,attrs);
	}

	public NewEditText (Context context, AttributeSet attrs, int defStyle) 
	{
		super(context,attrs,defStyle);
	}
		    
    public  boolean onPreDraw()
    {
    	super.onPreDraw();
    	if(oriHeight!=getHeight())
    	{
	    	if(sendButton==null)
		    	sendButton=(Button)((View)getParent()).findViewById(R.id.buttonsend);
	    	else
	    	{
		    	sendButton.setHeight(getHeight());		 
		    	sendButton.postInvalidate();
	    	}
	    	oriHeight=getHeight();
    	}
    	return true;
    	
    }
}
